package com.zyj.framework.web.service;

import com.zyj.common.core.domain.entity.SysDictData;
import com.zyj.supplier.domain.AsstesSupplier;
import com.zyj.supplier.service.IAsstesSupplierService;
import com.zyj.system.service.ISysDictDataService;
import com.zyj.system.service.ISysDictTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * RuoYi首创 html调用 thymeleaf 实现字典读取
 * 

 */
@Service("supplier")
public class SupplierService
{
    @Autowired
    private ISysDictTypeService dictTypeService;

    @Autowired
    private ISysDictDataService dictDataService;

    @Autowired
    private IAsstesSupplierService asstesSupplierService;

    /**
     * 根据字典类型查询字典数据信息
     *
     * @return 参数键值
     */
    public List<AsstesSupplier> getSupplier()
    {
        return asstesSupplierService.selectAsstesSupplierList(null);
    }

    /**
     * 根据字典类型和字典键值查询字典数据信息
     *
     * @return 字典标签
     */
    public String getLabel(Long id)
    {
        return asstesSupplierService.selectAsstesSupplierBySupplierId(id).getSupplierName();
    }
}
